﻿using System.Collections.Generic;
using WpfApplication6.Model;

namespace WpfApplication6.ViewModel
{
    public class ProductsViewModel : ItemsListViewModel<ProductViewModel>
    {
        public ProductsViewModel(IProductsRepository productsRepository)
        {
            ItemsList = new List<ProductViewModel>();

            foreach (ProductItem product in productsRepository.GetProducts())
            {
                ItemsList.Add(new ProductViewModel(product));
            }
        }
    }
}